import request from "@/utils/request";

// 查询预约列表
export function listAppointment(query) {
  return request({
    url: "/pond/appointment/list",
    method: "get",
    params: query,
  });
}

// 查询预约详细
export function getAppointment(id) {
  return request({
    url: "/pond/appointment/" + id,
    method: "get",
  });
}

// 新增预约
export function addAppointment(data) {
  return request({
    url: "/pond/appointment",
    method: "post",
    data: data,
  });
}

// 修改预约
export function updateAppointment(data) {
  return request({
    url: "/pond/appointment",
    method: "put",
    data: data,
  });
}

// 删除预约
export function delAppointment(id) {
  return request({
    url: "/pond/appointment/" + id,
    method: "delete",
  });
}

// 导出预约
export function exportAppointment(query) {
  return request({
    url: "/pond/appointment/export",
    method: "get",
    params: query,
  });
}

// 当前登录用户的预约信息
export function getUserAppointment() {
  return request({
    url: "/pond/appointment/user",
    method: "get",
  });
}

